/*
 * Selling Partner API for Notifications
 *
 * The Selling Partner API for Notifications lets you subscribe to notifications that are relevant to a selling partner's business. Using this API you can create a destination to receive notifications, subscribe to notifications, delete notification subscriptions, and more.  For more information, refer to the [Notifications Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/notifications-api-v1-use-case-guide).
 *
 * The version of the OpenAPI document: v1
 * Generated by: https://github.com/openapitools/openapi-generator.git
 */

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using RestSharp;
using software.amzn.spapi.Client;
using software.amzn.spapi.Auth;

using software.amzn.spapi.Model.notifications.v1;

namespace software.amzn.spapi.Api.notifications.v1
{
    /// <summary>
    /// Represents a collection of functions to interact with the API endpoints
    /// </summary>
    public interface INotificationsApi : IApiAccessor
    {
        #region Synchronous Operations
        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Creates a destination resource to receive notifications. The &#x60;createDestination&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="body"></param>
        /// <returns>CreateDestinationResponse</returns>
        CreateDestinationResponse CreateDestination (CreateDestinationRequest body);

        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Creates a destination resource to receive notifications. The &#x60;createDestination&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="body"></param>
        /// <returns>ApiResponse of CreateDestinationResponse</returns>
        ApiResponse<CreateDestinationResponse> CreateDestinationWithHttpInfo (CreateDestinationRequest body);
        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Creates a subscription for the specified notification type to be delivered to the specified destination. Before you can subscribe, you must first create the destination by calling the &#x60;createDestination&#x60; operation. In cases where the specified notification type supports multiple payload versions, you can utilize this API to subscribe to a different payload version if you already have an existing subscription for a different payload version.  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="notificationType">The type of notification.   For more information about notification types, refer to [Notification Type Values](https://developer-docs.amazon.com/sp-api/docs/notification-type-values).</param>
        /// <param name="body"></param>
        /// <returns>CreateSubscriptionResponse</returns>
        CreateSubscriptionResponse CreateSubscription (string notificationType, CreateSubscriptionRequest body);

        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Creates a subscription for the specified notification type to be delivered to the specified destination. Before you can subscribe, you must first create the destination by calling the &#x60;createDestination&#x60; operation. In cases where the specified notification type supports multiple payload versions, you can utilize this API to subscribe to a different payload version if you already have an existing subscription for a different payload version.  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="notificationType">The type of notification.   For more information about notification types, refer to [Notification Type Values](https://developer-docs.amazon.com/sp-api/docs/notification-type-values).</param>
        /// <param name="body"></param>
        /// <returns>ApiResponse of CreateSubscriptionResponse</returns>
        ApiResponse<CreateSubscriptionResponse> CreateSubscriptionWithHttpInfo (string notificationType, CreateSubscriptionRequest body);
        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Deletes the destination that you specify. The &#x60;deleteDestination&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="destinationId">The identifier for the destination that you want to delete.</param>
        /// <returns>DeleteDestinationResponse</returns>
        DeleteDestinationResponse DeleteDestination (string destinationId);

        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Deletes the destination that you specify. The &#x60;deleteDestination&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="destinationId">The identifier for the destination that you want to delete.</param>
        /// <returns>ApiResponse of DeleteDestinationResponse</returns>
        ApiResponse<DeleteDestinationResponse> DeleteDestinationWithHttpInfo (string destinationId);
        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Deletes the subscription indicated by the subscription identifier and notification type that you specify. The subscription identifier can be for any subscription associated with your application. After you successfully call this operation, notifications will stop being sent for the associated subscription. The &#x60;deleteSubscriptionById&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="subscriptionId">The identifier for the subscription that you want to delete.</param>
        /// <param name="notificationType">The type of notification.   For more information about notification types, refer to [Notification Type Values](https://developer-docs.amazon.com/sp-api/docs/notification-type-values).</param>
        /// <returns>DeleteSubscriptionByIdResponse</returns>
        DeleteSubscriptionByIdResponse DeleteSubscriptionById (string subscriptionId, string notificationType);

        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Deletes the subscription indicated by the subscription identifier and notification type that you specify. The subscription identifier can be for any subscription associated with your application. After you successfully call this operation, notifications will stop being sent for the associated subscription. The &#x60;deleteSubscriptionById&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="subscriptionId">The identifier for the subscription that you want to delete.</param>
        /// <param name="notificationType">The type of notification.   For more information about notification types, refer to [Notification Type Values](https://developer-docs.amazon.com/sp-api/docs/notification-type-values).</param>
        /// <returns>ApiResponse of DeleteSubscriptionByIdResponse</returns>
        ApiResponse<DeleteSubscriptionByIdResponse> DeleteSubscriptionByIdWithHttpInfo (string subscriptionId, string notificationType);
        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Returns information about the destination that you specify. The &#x60;getDestination&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="destinationId">The identifier generated when you created the destination.</param>
        /// <returns>GetDestinationResponse</returns>
        GetDestinationResponse GetDestination (string destinationId);

        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Returns information about the destination that you specify. The &#x60;getDestination&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="destinationId">The identifier generated when you created the destination.</param>
        /// <returns>ApiResponse of GetDestinationResponse</returns>
        ApiResponse<GetDestinationResponse> GetDestinationWithHttpInfo (string destinationId);
        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Returns information about all destinations. The &#x60;getDestinations&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <returns>GetDestinationsResponse</returns>
        GetDestinationsResponse GetDestinations ();

        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Returns information about all destinations. The &#x60;getDestinations&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <returns>ApiResponse of GetDestinationsResponse</returns>
        ApiResponse<GetDestinationsResponse> GetDestinationsWithHttpInfo ();
        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Returns information about subscription of the specified notification type and payload version. &#x60;payloadVersion&#x60; is an optional parameter. When &#x60;payloadVersion&#x60; is not provided, it will return latest payload version subscription&#39;s information. You can use this API to get subscription information when you do not have a subscription identifier.  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="notificationType">The type of notification.   For more information about notification types, refer to [Notification Type Values](https://developer-docs.amazon.com/sp-api/docs/notification-type-values).</param>
        /// <param name="payloadVersion">The version of the payload object to be used in the notification. (optional)</param>
        /// <returns>GetSubscriptionResponse</returns>
        GetSubscriptionResponse GetSubscription (string notificationType, string? payloadVersion = null);

        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Returns information about subscription of the specified notification type and payload version. &#x60;payloadVersion&#x60; is an optional parameter. When &#x60;payloadVersion&#x60; is not provided, it will return latest payload version subscription&#39;s information. You can use this API to get subscription information when you do not have a subscription identifier.  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="notificationType">The type of notification.   For more information about notification types, refer to [Notification Type Values](https://developer-docs.amazon.com/sp-api/docs/notification-type-values).</param>
        /// <param name="payloadVersion">The version of the payload object to be used in the notification. (optional)</param>
        /// <returns>ApiResponse of GetSubscriptionResponse</returns>
        ApiResponse<GetSubscriptionResponse> GetSubscriptionWithHttpInfo (string notificationType, string? payloadVersion = null);
        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Returns information about a subscription for the specified notification type. The &#x60;getSubscriptionById&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="subscriptionId">The identifier for the subscription that you want to get.</param>
        /// <param name="notificationType">The type of notification.   For more information about notification types, refer to [Notification Type Values](https://developer-docs.amazon.com/sp-api/docs/notification-type-values).</param>
        /// <returns>GetSubscriptionByIdResponse</returns>
        GetSubscriptionByIdResponse GetSubscriptionById (string subscriptionId, string notificationType);

        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Returns information about a subscription for the specified notification type. The &#x60;getSubscriptionById&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="subscriptionId">The identifier for the subscription that you want to get.</param>
        /// <param name="notificationType">The type of notification.   For more information about notification types, refer to [Notification Type Values](https://developer-docs.amazon.com/sp-api/docs/notification-type-values).</param>
        /// <returns>ApiResponse of GetSubscriptionByIdResponse</returns>
        ApiResponse<GetSubscriptionByIdResponse> GetSubscriptionByIdWithHttpInfo (string subscriptionId, string notificationType);
        #endregion Synchronous Operations
        #region Asynchronous Operations
        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Creates a destination resource to receive notifications. The &#x60;createDestination&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="body"></param>
        /// <returns>Task of CreateDestinationResponse</returns>
        System.Threading.Tasks.Task<CreateDestinationResponse> CreateDestinationAsync (CreateDestinationRequest body);

        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Creates a destination resource to receive notifications. The &#x60;createDestination&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="body"></param>
        /// <returns>Task of ApiResponse (CreateDestinationResponse)</returns>
        System.Threading.Tasks.Task<ApiResponse<CreateDestinationResponse>> CreateDestinationAsyncWithHttpInfo (CreateDestinationRequest body);
        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Creates a subscription for the specified notification type to be delivered to the specified destination. Before you can subscribe, you must first create the destination by calling the &#x60;createDestination&#x60; operation. In cases where the specified notification type supports multiple payload versions, you can utilize this API to subscribe to a different payload version if you already have an existing subscription for a different payload version.  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="notificationType">The type of notification.   For more information about notification types, refer to [Notification Type Values](https://developer-docs.amazon.com/sp-api/docs/notification-type-values).</param>
        /// <param name="body"></param>
        /// <returns>Task of CreateSubscriptionResponse</returns>
        System.Threading.Tasks.Task<CreateSubscriptionResponse> CreateSubscriptionAsync (string notificationType, CreateSubscriptionRequest body);

        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Creates a subscription for the specified notification type to be delivered to the specified destination. Before you can subscribe, you must first create the destination by calling the &#x60;createDestination&#x60; operation. In cases where the specified notification type supports multiple payload versions, you can utilize this API to subscribe to a different payload version if you already have an existing subscription for a different payload version.  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="notificationType">The type of notification.   For more information about notification types, refer to [Notification Type Values](https://developer-docs.amazon.com/sp-api/docs/notification-type-values).</param>
        /// <param name="body"></param>
        /// <returns>Task of ApiResponse (CreateSubscriptionResponse)</returns>
        System.Threading.Tasks.Task<ApiResponse<CreateSubscriptionResponse>> CreateSubscriptionAsyncWithHttpInfo (string notificationType, CreateSubscriptionRequest body);
        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Deletes the destination that you specify. The &#x60;deleteDestination&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="destinationId">The identifier for the destination that you want to delete.</param>
        /// <returns>Task of DeleteDestinationResponse</returns>
        System.Threading.Tasks.Task<DeleteDestinationResponse> DeleteDestinationAsync (string destinationId);

        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Deletes the destination that you specify. The &#x60;deleteDestination&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="destinationId">The identifier for the destination that you want to delete.</param>
        /// <returns>Task of ApiResponse (DeleteDestinationResponse)</returns>
        System.Threading.Tasks.Task<ApiResponse<DeleteDestinationResponse>> DeleteDestinationAsyncWithHttpInfo (string destinationId);
        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Deletes the subscription indicated by the subscription identifier and notification type that you specify. The subscription identifier can be for any subscription associated with your application. After you successfully call this operation, notifications will stop being sent for the associated subscription. The &#x60;deleteSubscriptionById&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="subscriptionId">The identifier for the subscription that you want to delete.</param>
        /// <param name="notificationType">The type of notification.   For more information about notification types, refer to [Notification Type Values](https://developer-docs.amazon.com/sp-api/docs/notification-type-values).</param>
        /// <returns>Task of DeleteSubscriptionByIdResponse</returns>
        System.Threading.Tasks.Task<DeleteSubscriptionByIdResponse> DeleteSubscriptionByIdAsync (string subscriptionId, string notificationType);

        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Deletes the subscription indicated by the subscription identifier and notification type that you specify. The subscription identifier can be for any subscription associated with your application. After you successfully call this operation, notifications will stop being sent for the associated subscription. The &#x60;deleteSubscriptionById&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="subscriptionId">The identifier for the subscription that you want to delete.</param>
        /// <param name="notificationType">The type of notification.   For more information about notification types, refer to [Notification Type Values](https://developer-docs.amazon.com/sp-api/docs/notification-type-values).</param>
        /// <returns>Task of ApiResponse (DeleteSubscriptionByIdResponse)</returns>
        System.Threading.Tasks.Task<ApiResponse<DeleteSubscriptionByIdResponse>> DeleteSubscriptionByIdAsyncWithHttpInfo (string subscriptionId, string notificationType);
        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Returns information about the destination that you specify. The &#x60;getDestination&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="destinationId">The identifier generated when you created the destination.</param>
        /// <returns>Task of GetDestinationResponse</returns>
        System.Threading.Tasks.Task<GetDestinationResponse> GetDestinationAsync (string destinationId);

        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Returns information about the destination that you specify. The &#x60;getDestination&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="destinationId">The identifier generated when you created the destination.</param>
        /// <returns>Task of ApiResponse (GetDestinationResponse)</returns>
        System.Threading.Tasks.Task<ApiResponse<GetDestinationResponse>> GetDestinationAsyncWithHttpInfo (string destinationId);
        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Returns information about all destinations. The &#x60;getDestinations&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <returns>Task of GetDestinationsResponse</returns>
        System.Threading.Tasks.Task<GetDestinationsResponse> GetDestinationsAsync ();

        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Returns information about all destinations. The &#x60;getDestinations&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <returns>Task of ApiResponse (GetDestinationsResponse)</returns>
        System.Threading.Tasks.Task<ApiResponse<GetDestinationsResponse>> GetDestinationsAsyncWithHttpInfo ();
        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Returns information about subscription of the specified notification type and payload version. &#x60;payloadVersion&#x60; is an optional parameter. When &#x60;payloadVersion&#x60; is not provided, it will return latest payload version subscription&#39;s information. You can use this API to get subscription information when you do not have a subscription identifier.  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="notificationType">The type of notification.   For more information about notification types, refer to [Notification Type Values](https://developer-docs.amazon.com/sp-api/docs/notification-type-values).</param>
        /// <param name="payloadVersion">The version of the payload object to be used in the notification. (optional)</param>
        /// <returns>Task of GetSubscriptionResponse</returns>
        System.Threading.Tasks.Task<GetSubscriptionResponse> GetSubscriptionAsync (string notificationType, string? payloadVersion = null);

        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Returns information about subscription of the specified notification type and payload version. &#x60;payloadVersion&#x60; is an optional parameter. When &#x60;payloadVersion&#x60; is not provided, it will return latest payload version subscription&#39;s information. You can use this API to get subscription information when you do not have a subscription identifier.  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="notificationType">The type of notification.   For more information about notification types, refer to [Notification Type Values](https://developer-docs.amazon.com/sp-api/docs/notification-type-values).</param>
        /// <param name="payloadVersion">The version of the payload object to be used in the notification. (optional)</param>
        /// <returns>Task of ApiResponse (GetSubscriptionResponse)</returns>
        System.Threading.Tasks.Task<ApiResponse<GetSubscriptionResponse>> GetSubscriptionAsyncWithHttpInfo (string notificationType, string? payloadVersion = null);
        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Returns information about a subscription for the specified notification type. The &#x60;getSubscriptionById&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="subscriptionId">The identifier for the subscription that you want to get.</param>
        /// <param name="notificationType">The type of notification.   For more information about notification types, refer to [Notification Type Values](https://developer-docs.amazon.com/sp-api/docs/notification-type-values).</param>
        /// <returns>Task of GetSubscriptionByIdResponse</returns>
        System.Threading.Tasks.Task<GetSubscriptionByIdResponse> GetSubscriptionByIdAsync (string subscriptionId, string notificationType);

        /// <summary>
        /// 
        /// </summary>
        /// <remarks>
        /// Returns information about a subscription for the specified notification type. The &#x60;getSubscriptionById&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </remarks>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="subscriptionId">The identifier for the subscription that you want to get.</param>
        /// <param name="notificationType">The type of notification.   For more information about notification types, refer to [Notification Type Values](https://developer-docs.amazon.com/sp-api/docs/notification-type-values).</param>
        /// <returns>Task of ApiResponse (GetSubscriptionByIdResponse)</returns>
        System.Threading.Tasks.Task<ApiResponse<GetSubscriptionByIdResponse>> GetSubscriptionByIdAsyncWithHttpInfo (string subscriptionId, string notificationType);
        #endregion Asynchronous Operations
    }

    /// <summary>
    /// Represents a collection of functions to interact with the API endpoints
    /// </summary>
    public partial class NotificationsApi : INotificationsApi
    {
        private software.amzn.spapi.Client.ExceptionFactory _exceptionFactory = (name, response) => null;

        /// <summary>
        /// Initializes a new instance of the <see cref="NotificationsApi"/> class
        /// using Configuration object
        /// </summary>
        /// <param name="configuration">An instance of Configuration</param>
        /// <returns></returns>
        public NotificationsApi(software.amzn.spapi.Client.Configuration configuration)
        {
            this.Configuration = configuration;
            ExceptionFactory = software.amzn.spapi.Client.Configuration.DefaultExceptionFactory;
        }

        IReadableConfiguration IApiAccessor.Configuration 
        {
            get => Configuration;  // Implicit upcast to interface
            set => Configuration = (software.amzn.spapi.Client.Configuration)value;
        }

        /// <summary>
        /// Gets the base path of the API client.
        /// </summary>
        /// <value>The base path</value>
        public String GetBasePath()
        {
            return this.Configuration.ApiClient.RestClient.Options.BaseUrl.ToString();
        }

        /// <summary>
        /// Sets the base path of the API client.
        /// </summary>
        /// <value>The base path</value>
        [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")]
        public void SetBasePath(String basePath)
        {
            // do nothing
        }

        /// <summary>
        /// Gets or sets the configuration object
        /// </summary>
        /// <value>An instance of the Configuration</value>
        public software.amzn.spapi.Client.Configuration Configuration {get; set;}

        /// <summary>
        /// Provides a factory method hook for the creation of exceptions.
        /// </summary>
        public software.amzn.spapi.Client.ExceptionFactory ExceptionFactory
        {
            get
            {
                if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1)
                {
                    throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported.");
                }
                return _exceptionFactory;
            }
            set { _exceptionFactory = value; }
        }

        /// <summary>
        /// Gets the default header.
        /// </summary>
        /// <returns>Dictionary of HTTP header</returns>
        [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")]
        public IDictionary<String, String> DefaultHeader()
        {
            return new ReadOnlyDictionary<string, string>(this.Configuration.DefaultHeader);
        }

        /// <summary>
        /// Add default header.
        /// </summary>
        /// <param name="key">Header field name.</param>
        /// <param name="value">Header field value.</param>
        /// <returns></returns>
        [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")]
        public void AddDefaultHeader(string key, string value)
        {
            this.Configuration.AddDefaultHeader(key, value);
        }

        /// <summary>
        ///  Creates a destination resource to receive notifications. The &#x60;createDestination&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="body"></param>
        /// <returns>CreateDestinationResponse</returns>
        public CreateDestinationResponse CreateDestination (CreateDestinationRequest body)
        {
             ApiResponse<CreateDestinationResponse> localVarResponse = CreateDestinationWithHttpInfo(body);
             return localVarResponse.Data;
        }

        /// <summary>
        ///  Creates a destination resource to receive notifications. The &#x60;createDestination&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="body"></param>
        /// <returns>ApiResponse of CreateDestinationResponse</returns>
        public ApiResponse< CreateDestinationResponse > CreateDestinationWithHttpInfo (CreateDestinationRequest body)
        {
            // verify the required parameter 'body' is set
            if (body == null)
                throw new ApiException(400, "Missing required parameter 'body' when calling NotificationsApi->CreateDestination");

            var localVarPath = "/notifications/v1/destinations";
            var localVarPathParams = new Dictionary<String, String>();
            var localVarQueryParams = new List<KeyValuePair<String, String>>();
            var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
            var localVarFormParams = new Dictionary<String, String>();
            var localVarFileParams = new Dictionary<String, FileParameter>();
            Object localVarPostBody = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
                "application/json"
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json",
                "Successful Response"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
            if (localVarHttpHeaderAccept != null)
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);

            if (body != null && body.GetType() != typeof(byte[]))
            {
                localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
            }
            else
            {
                localVarPostBody = body; // byte array
            }


            // make the HTTP request
            RestResponse localVarResponse = (RestResponse) this.Configuration.ApiClient.CallApi(localVarPath, ChangeHttpMethod("POST"), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int) localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("CreateDestination", localVarResponse);
                if (exception != null) throw exception;
            }

            return new ApiResponse<CreateDestinationResponse>(localVarResponse.StatusCode,
                ConvertHeadersToMultimap(localVarResponse),
                (CreateDestinationResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateDestinationResponse)));
        }

        /// <summary>
        ///  Creates a destination resource to receive notifications. The &#x60;createDestination&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="body"></param>
        /// <returns>Task of CreateDestinationResponse</returns>
        public async System.Threading.Tasks.Task<CreateDestinationResponse> CreateDestinationAsync (CreateDestinationRequest body)
        {
             ApiResponse<CreateDestinationResponse> localVarResponse = await CreateDestinationAsyncWithHttpInfo(body);
             return localVarResponse.Data;

        }

        /// <summary>
        ///  Creates a destination resource to receive notifications. The &#x60;createDestination&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="body"></param>
        /// <returns>Task of ApiResponse (CreateDestinationResponse)</returns>
        public async System.Threading.Tasks.Task<ApiResponse<CreateDestinationResponse>> CreateDestinationAsyncWithHttpInfo (CreateDestinationRequest body)
        {
            // verify the required parameter 'body' is set
            if (body == null)
                throw new ApiException(400, "Missing required parameter 'body' when calling NotificationsApi->CreateDestination");

            var localVarPath = "/notifications/v1/destinations";
            var localVarPathParams = new Dictionary<String, String>();
            var localVarQueryParams = new List<KeyValuePair<String, String>>();
            var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
            var localVarFormParams = new Dictionary<String, String>();
            var localVarFileParams = new Dictionary<String, FileParameter>();
            Object localVarPostBody = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
                "application/json"
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json",
                "Successful Response"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
            if (localVarHttpHeaderAccept != null)
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);

            if (body != null && body.GetType() != typeof(byte[]))
            {
                localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
            }
            else
            {
                localVarPostBody = body; // byte array
            }


            // make the HTTP request
            RestResponse localVarResponse = (RestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, ChangeHttpMethod("POST"), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType);
            int localVarStatusCode = (int) localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("CreateDestination", localVarResponse);
                if (exception != null) throw exception;
            }

            return new ApiResponse<CreateDestinationResponse>(localVarResponse.StatusCode,
                ConvertHeadersToMultimap(localVarResponse),
                (CreateDestinationResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateDestinationResponse)));
        }

        /// <summary>
        ///  Creates a subscription for the specified notification type to be delivered to the specified destination. Before you can subscribe, you must first create the destination by calling the &#x60;createDestination&#x60; operation. In cases where the specified notification type supports multiple payload versions, you can utilize this API to subscribe to a different payload version if you already have an existing subscription for a different payload version.  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="notificationType">The type of notification.   For more information about notification types, refer to [Notification Type Values](https://developer-docs.amazon.com/sp-api/docs/notification-type-values).</param>
        /// <param name="body"></param>
        /// <returns>CreateSubscriptionResponse</returns>
        public CreateSubscriptionResponse CreateSubscription (string notificationType, CreateSubscriptionRequest body)
        {
             ApiResponse<CreateSubscriptionResponse> localVarResponse = CreateSubscriptionWithHttpInfo(notificationType, body);
             return localVarResponse.Data;
        }

        /// <summary>
        ///  Creates a subscription for the specified notification type to be delivered to the specified destination. Before you can subscribe, you must first create the destination by calling the &#x60;createDestination&#x60; operation. In cases where the specified notification type supports multiple payload versions, you can utilize this API to subscribe to a different payload version if you already have an existing subscription for a different payload version.  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="notificationType">The type of notification.   For more information about notification types, refer to [Notification Type Values](https://developer-docs.amazon.com/sp-api/docs/notification-type-values).</param>
        /// <param name="body"></param>
        /// <returns>ApiResponse of CreateSubscriptionResponse</returns>
        public ApiResponse< CreateSubscriptionResponse > CreateSubscriptionWithHttpInfo (string notificationType, CreateSubscriptionRequest body)
        {
            // verify the required parameter 'notificationType' is set
            if (notificationType == null)
                throw new ApiException(400, "Missing required parameter 'notificationType' when calling NotificationsApi->CreateSubscription");
            // verify the required parameter 'body' is set
            if (body == null)
                throw new ApiException(400, "Missing required parameter 'body' when calling NotificationsApi->CreateSubscription");

            var localVarPath = "/notifications/v1/subscriptions/{notificationType}";
            var localVarPathParams = new Dictionary<String, String>();
            var localVarQueryParams = new List<KeyValuePair<String, String>>();
            var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
            var localVarFormParams = new Dictionary<String, String>();
            var localVarFileParams = new Dictionary<String, FileParameter>();
            Object localVarPostBody = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
                "application/json"
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json",
                "Successful Response"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
            if (localVarHttpHeaderAccept != null)
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);

            if (notificationType != null) localVarPathParams.Add("notificationType", this.Configuration.ApiClient.ParameterToString(notificationType)); // path parameter
            if (body != null && body.GetType() != typeof(byte[]))
            {
                localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
            }
            else
            {
                localVarPostBody = body; // byte array
            }


            // make the HTTP request
            RestResponse localVarResponse = (RestResponse) this.Configuration.ApiClient.CallApi(localVarPath, ChangeHttpMethod("POST"), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int) localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("CreateSubscription", localVarResponse);
                if (exception != null) throw exception;
            }

            return new ApiResponse<CreateSubscriptionResponse>(localVarResponse.StatusCode,
                ConvertHeadersToMultimap(localVarResponse),
                (CreateSubscriptionResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateSubscriptionResponse)));
        }

        /// <summary>
        ///  Creates a subscription for the specified notification type to be delivered to the specified destination. Before you can subscribe, you must first create the destination by calling the &#x60;createDestination&#x60; operation. In cases where the specified notification type supports multiple payload versions, you can utilize this API to subscribe to a different payload version if you already have an existing subscription for a different payload version.  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="notificationType">The type of notification.   For more information about notification types, refer to [Notification Type Values](https://developer-docs.amazon.com/sp-api/docs/notification-type-values).</param>
        /// <param name="body"></param>
        /// <returns>Task of CreateSubscriptionResponse</returns>
        public async System.Threading.Tasks.Task<CreateSubscriptionResponse> CreateSubscriptionAsync (string notificationType, CreateSubscriptionRequest body)
        {
             ApiResponse<CreateSubscriptionResponse> localVarResponse = await CreateSubscriptionAsyncWithHttpInfo(notificationType, body);
             return localVarResponse.Data;

        }

        /// <summary>
        ///  Creates a subscription for the specified notification type to be delivered to the specified destination. Before you can subscribe, you must first create the destination by calling the &#x60;createDestination&#x60; operation. In cases where the specified notification type supports multiple payload versions, you can utilize this API to subscribe to a different payload version if you already have an existing subscription for a different payload version.  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="notificationType">The type of notification.   For more information about notification types, refer to [Notification Type Values](https://developer-docs.amazon.com/sp-api/docs/notification-type-values).</param>
        /// <param name="body"></param>
        /// <returns>Task of ApiResponse (CreateSubscriptionResponse)</returns>
        public async System.Threading.Tasks.Task<ApiResponse<CreateSubscriptionResponse>> CreateSubscriptionAsyncWithHttpInfo (string notificationType, CreateSubscriptionRequest body)
        {
            // verify the required parameter 'notificationType' is set
            if (notificationType == null)
                throw new ApiException(400, "Missing required parameter 'notificationType' when calling NotificationsApi->CreateSubscription");
            // verify the required parameter 'body' is set
            if (body == null)
                throw new ApiException(400, "Missing required parameter 'body' when calling NotificationsApi->CreateSubscription");

            var localVarPath = "/notifications/v1/subscriptions/{notificationType}";
            var localVarPathParams = new Dictionary<String, String>();
            var localVarQueryParams = new List<KeyValuePair<String, String>>();
            var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
            var localVarFormParams = new Dictionary<String, String>();
            var localVarFileParams = new Dictionary<String, FileParameter>();
            Object localVarPostBody = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
                "application/json"
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json",
                "Successful Response"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
            if (localVarHttpHeaderAccept != null)
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);

            if (notificationType != null) localVarPathParams.Add("notificationType", this.Configuration.ApiClient.ParameterToString(notificationType)); // path parameter
            if (body != null && body.GetType() != typeof(byte[]))
            {
                localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter
            }
            else
            {
                localVarPostBody = body; // byte array
            }


            // make the HTTP request
            RestResponse localVarResponse = (RestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, ChangeHttpMethod("POST"), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType);
            int localVarStatusCode = (int) localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("CreateSubscription", localVarResponse);
                if (exception != null) throw exception;
            }

            return new ApiResponse<CreateSubscriptionResponse>(localVarResponse.StatusCode,
                ConvertHeadersToMultimap(localVarResponse),
                (CreateSubscriptionResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(CreateSubscriptionResponse)));
        }

        /// <summary>
        ///  Deletes the destination that you specify. The &#x60;deleteDestination&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="destinationId">The identifier for the destination that you want to delete.</param>
        /// <returns>DeleteDestinationResponse</returns>
        public DeleteDestinationResponse DeleteDestination (string destinationId)
        {
             ApiResponse<DeleteDestinationResponse> localVarResponse = DeleteDestinationWithHttpInfo(destinationId);
             return localVarResponse.Data;
        }

        /// <summary>
        ///  Deletes the destination that you specify. The &#x60;deleteDestination&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="destinationId">The identifier for the destination that you want to delete.</param>
        /// <returns>ApiResponse of DeleteDestinationResponse</returns>
        public ApiResponse< DeleteDestinationResponse > DeleteDestinationWithHttpInfo (string destinationId)
        {
            // verify the required parameter 'destinationId' is set
            if (destinationId == null)
                throw new ApiException(400, "Missing required parameter 'destinationId' when calling NotificationsApi->DeleteDestination");

            var localVarPath = "/notifications/v1/destinations/{destinationId}";
            var localVarPathParams = new Dictionary<String, String>();
            var localVarQueryParams = new List<KeyValuePair<String, String>>();
            var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
            var localVarFormParams = new Dictionary<String, String>();
            var localVarFileParams = new Dictionary<String, FileParameter>();
            Object localVarPostBody = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json",
                "Successful Response"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
            if (localVarHttpHeaderAccept != null)
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);

            if (destinationId != null) localVarPathParams.Add("destinationId", this.Configuration.ApiClient.ParameterToString(destinationId)); // path parameter


            // make the HTTP request
            RestResponse localVarResponse = (RestResponse) this.Configuration.ApiClient.CallApi(localVarPath, ChangeHttpMethod("DELETE"), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int) localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("DeleteDestination", localVarResponse);
                if (exception != null) throw exception;
            }

            return new ApiResponse<DeleteDestinationResponse>(localVarResponse.StatusCode,
                ConvertHeadersToMultimap(localVarResponse),
                (DeleteDestinationResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(DeleteDestinationResponse)));
        }

        /// <summary>
        ///  Deletes the destination that you specify. The &#x60;deleteDestination&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="destinationId">The identifier for the destination that you want to delete.</param>
        /// <returns>Task of DeleteDestinationResponse</returns>
        public async System.Threading.Tasks.Task<DeleteDestinationResponse> DeleteDestinationAsync (string destinationId)
        {
             ApiResponse<DeleteDestinationResponse> localVarResponse = await DeleteDestinationAsyncWithHttpInfo(destinationId);
             return localVarResponse.Data;

        }

        /// <summary>
        ///  Deletes the destination that you specify. The &#x60;deleteDestination&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="destinationId">The identifier for the destination that you want to delete.</param>
        /// <returns>Task of ApiResponse (DeleteDestinationResponse)</returns>
        public async System.Threading.Tasks.Task<ApiResponse<DeleteDestinationResponse>> DeleteDestinationAsyncWithHttpInfo (string destinationId)
        {
            // verify the required parameter 'destinationId' is set
            if (destinationId == null)
                throw new ApiException(400, "Missing required parameter 'destinationId' when calling NotificationsApi->DeleteDestination");

            var localVarPath = "/notifications/v1/destinations/{destinationId}";
            var localVarPathParams = new Dictionary<String, String>();
            var localVarQueryParams = new List<KeyValuePair<String, String>>();
            var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
            var localVarFormParams = new Dictionary<String, String>();
            var localVarFileParams = new Dictionary<String, FileParameter>();
            Object localVarPostBody = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json",
                "Successful Response"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
            if (localVarHttpHeaderAccept != null)
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);

            if (destinationId != null) localVarPathParams.Add("destinationId", this.Configuration.ApiClient.ParameterToString(destinationId)); // path parameter


            // make the HTTP request
            RestResponse localVarResponse = (RestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, ChangeHttpMethod("DELETE"), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType);
            int localVarStatusCode = (int) localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("DeleteDestination", localVarResponse);
                if (exception != null) throw exception;
            }

            return new ApiResponse<DeleteDestinationResponse>(localVarResponse.StatusCode,
                ConvertHeadersToMultimap(localVarResponse),
                (DeleteDestinationResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(DeleteDestinationResponse)));
        }

        /// <summary>
        ///  Deletes the subscription indicated by the subscription identifier and notification type that you specify. The subscription identifier can be for any subscription associated with your application. After you successfully call this operation, notifications will stop being sent for the associated subscription. The &#x60;deleteSubscriptionById&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="subscriptionId">The identifier for the subscription that you want to delete.</param>
        /// <param name="notificationType">The type of notification.   For more information about notification types, refer to [Notification Type Values](https://developer-docs.amazon.com/sp-api/docs/notification-type-values).</param>
        /// <returns>DeleteSubscriptionByIdResponse</returns>
        public DeleteSubscriptionByIdResponse DeleteSubscriptionById (string subscriptionId, string notificationType)
        {
             ApiResponse<DeleteSubscriptionByIdResponse> localVarResponse = DeleteSubscriptionByIdWithHttpInfo(subscriptionId, notificationType);
             return localVarResponse.Data;
        }

        /// <summary>
        ///  Deletes the subscription indicated by the subscription identifier and notification type that you specify. The subscription identifier can be for any subscription associated with your application. After you successfully call this operation, notifications will stop being sent for the associated subscription. The &#x60;deleteSubscriptionById&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="subscriptionId">The identifier for the subscription that you want to delete.</param>
        /// <param name="notificationType">The type of notification.   For more information about notification types, refer to [Notification Type Values](https://developer-docs.amazon.com/sp-api/docs/notification-type-values).</param>
        /// <returns>ApiResponse of DeleteSubscriptionByIdResponse</returns>
        public ApiResponse< DeleteSubscriptionByIdResponse > DeleteSubscriptionByIdWithHttpInfo (string subscriptionId, string notificationType)
        {
            // verify the required parameter 'subscriptionId' is set
            if (subscriptionId == null)
                throw new ApiException(400, "Missing required parameter 'subscriptionId' when calling NotificationsApi->DeleteSubscriptionById");
            // verify the required parameter 'notificationType' is set
            if (notificationType == null)
                throw new ApiException(400, "Missing required parameter 'notificationType' when calling NotificationsApi->DeleteSubscriptionById");

            var localVarPath = "/notifications/v1/subscriptions/{notificationType}/{subscriptionId}";
            var localVarPathParams = new Dictionary<String, String>();
            var localVarQueryParams = new List<KeyValuePair<String, String>>();
            var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
            var localVarFormParams = new Dictionary<String, String>();
            var localVarFileParams = new Dictionary<String, FileParameter>();
            Object localVarPostBody = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json",
                "Successful Operation Response"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
            if (localVarHttpHeaderAccept != null)
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);

            if (subscriptionId != null) localVarPathParams.Add("subscriptionId", this.Configuration.ApiClient.ParameterToString(subscriptionId)); // path parameter
            if (notificationType != null) localVarPathParams.Add("notificationType", this.Configuration.ApiClient.ParameterToString(notificationType)); // path parameter


            // make the HTTP request
            RestResponse localVarResponse = (RestResponse) this.Configuration.ApiClient.CallApi(localVarPath, ChangeHttpMethod("DELETE"), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int) localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("DeleteSubscriptionById", localVarResponse);
                if (exception != null) throw exception;
            }

            return new ApiResponse<DeleteSubscriptionByIdResponse>(localVarResponse.StatusCode,
                ConvertHeadersToMultimap(localVarResponse),
                (DeleteSubscriptionByIdResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(DeleteSubscriptionByIdResponse)));
        }

        /// <summary>
        ///  Deletes the subscription indicated by the subscription identifier and notification type that you specify. The subscription identifier can be for any subscription associated with your application. After you successfully call this operation, notifications will stop being sent for the associated subscription. The &#x60;deleteSubscriptionById&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="subscriptionId">The identifier for the subscription that you want to delete.</param>
        /// <param name="notificationType">The type of notification.   For more information about notification types, refer to [Notification Type Values](https://developer-docs.amazon.com/sp-api/docs/notification-type-values).</param>
        /// <returns>Task of DeleteSubscriptionByIdResponse</returns>
        public async System.Threading.Tasks.Task<DeleteSubscriptionByIdResponse> DeleteSubscriptionByIdAsync (string subscriptionId, string notificationType)
        {
             ApiResponse<DeleteSubscriptionByIdResponse> localVarResponse = await DeleteSubscriptionByIdAsyncWithHttpInfo(subscriptionId, notificationType);
             return localVarResponse.Data;

        }

        /// <summary>
        ///  Deletes the subscription indicated by the subscription identifier and notification type that you specify. The subscription identifier can be for any subscription associated with your application. After you successfully call this operation, notifications will stop being sent for the associated subscription. The &#x60;deleteSubscriptionById&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="subscriptionId">The identifier for the subscription that you want to delete.</param>
        /// <param name="notificationType">The type of notification.   For more information about notification types, refer to [Notification Type Values](https://developer-docs.amazon.com/sp-api/docs/notification-type-values).</param>
        /// <returns>Task of ApiResponse (DeleteSubscriptionByIdResponse)</returns>
        public async System.Threading.Tasks.Task<ApiResponse<DeleteSubscriptionByIdResponse>> DeleteSubscriptionByIdAsyncWithHttpInfo (string subscriptionId, string notificationType)
        {
            // verify the required parameter 'subscriptionId' is set
            if (subscriptionId == null)
                throw new ApiException(400, "Missing required parameter 'subscriptionId' when calling NotificationsApi->DeleteSubscriptionById");
            // verify the required parameter 'notificationType' is set
            if (notificationType == null)
                throw new ApiException(400, "Missing required parameter 'notificationType' when calling NotificationsApi->DeleteSubscriptionById");

            var localVarPath = "/notifications/v1/subscriptions/{notificationType}/{subscriptionId}";
            var localVarPathParams = new Dictionary<String, String>();
            var localVarQueryParams = new List<KeyValuePair<String, String>>();
            var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
            var localVarFormParams = new Dictionary<String, String>();
            var localVarFileParams = new Dictionary<String, FileParameter>();
            Object localVarPostBody = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json",
                "Successful Operation Response"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
            if (localVarHttpHeaderAccept != null)
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);

            if (subscriptionId != null) localVarPathParams.Add("subscriptionId", this.Configuration.ApiClient.ParameterToString(subscriptionId)); // path parameter
            if (notificationType != null) localVarPathParams.Add("notificationType", this.Configuration.ApiClient.ParameterToString(notificationType)); // path parameter


            // make the HTTP request
            RestResponse localVarResponse = (RestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, ChangeHttpMethod("DELETE"), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType);
            int localVarStatusCode = (int) localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("DeleteSubscriptionById", localVarResponse);
                if (exception != null) throw exception;
            }

            return new ApiResponse<DeleteSubscriptionByIdResponse>(localVarResponse.StatusCode,
                ConvertHeadersToMultimap(localVarResponse),
                (DeleteSubscriptionByIdResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(DeleteSubscriptionByIdResponse)));
        }

        /// <summary>
        ///  Returns information about the destination that you specify. The &#x60;getDestination&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="destinationId">The identifier generated when you created the destination.</param>
        /// <returns>GetDestinationResponse</returns>
        public GetDestinationResponse GetDestination (string destinationId)
        {
             ApiResponse<GetDestinationResponse> localVarResponse = GetDestinationWithHttpInfo(destinationId);
             return localVarResponse.Data;
        }

        /// <summary>
        ///  Returns information about the destination that you specify. The &#x60;getDestination&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="destinationId">The identifier generated when you created the destination.</param>
        /// <returns>ApiResponse of GetDestinationResponse</returns>
        public ApiResponse< GetDestinationResponse > GetDestinationWithHttpInfo (string destinationId)
        {
            // verify the required parameter 'destinationId' is set
            if (destinationId == null)
                throw new ApiException(400, "Missing required parameter 'destinationId' when calling NotificationsApi->GetDestination");

            var localVarPath = "/notifications/v1/destinations/{destinationId}";
            var localVarPathParams = new Dictionary<String, String>();
            var localVarQueryParams = new List<KeyValuePair<String, String>>();
            var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
            var localVarFormParams = new Dictionary<String, String>();
            var localVarFileParams = new Dictionary<String, FileParameter>();
            Object localVarPostBody = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json",
                "Successful Response"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
            if (localVarHttpHeaderAccept != null)
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);

            if (destinationId != null) localVarPathParams.Add("destinationId", this.Configuration.ApiClient.ParameterToString(destinationId)); // path parameter


            // make the HTTP request
            RestResponse localVarResponse = (RestResponse) this.Configuration.ApiClient.CallApi(localVarPath, ChangeHttpMethod("GET"), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int) localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("GetDestination", localVarResponse);
                if (exception != null) throw exception;
            }

            return new ApiResponse<GetDestinationResponse>(localVarResponse.StatusCode,
                ConvertHeadersToMultimap(localVarResponse),
                (GetDestinationResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetDestinationResponse)));
        }

        /// <summary>
        ///  Returns information about the destination that you specify. The &#x60;getDestination&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="destinationId">The identifier generated when you created the destination.</param>
        /// <returns>Task of GetDestinationResponse</returns>
        public async System.Threading.Tasks.Task<GetDestinationResponse> GetDestinationAsync (string destinationId)
        {
             ApiResponse<GetDestinationResponse> localVarResponse = await GetDestinationAsyncWithHttpInfo(destinationId);
             return localVarResponse.Data;

        }

        /// <summary>
        ///  Returns information about the destination that you specify. The &#x60;getDestination&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="destinationId">The identifier generated when you created the destination.</param>
        /// <returns>Task of ApiResponse (GetDestinationResponse)</returns>
        public async System.Threading.Tasks.Task<ApiResponse<GetDestinationResponse>> GetDestinationAsyncWithHttpInfo (string destinationId)
        {
            // verify the required parameter 'destinationId' is set
            if (destinationId == null)
                throw new ApiException(400, "Missing required parameter 'destinationId' when calling NotificationsApi->GetDestination");

            var localVarPath = "/notifications/v1/destinations/{destinationId}";
            var localVarPathParams = new Dictionary<String, String>();
            var localVarQueryParams = new List<KeyValuePair<String, String>>();
            var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
            var localVarFormParams = new Dictionary<String, String>();
            var localVarFileParams = new Dictionary<String, FileParameter>();
            Object localVarPostBody = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json",
                "Successful Response"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
            if (localVarHttpHeaderAccept != null)
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);

            if (destinationId != null) localVarPathParams.Add("destinationId", this.Configuration.ApiClient.ParameterToString(destinationId)); // path parameter


            // make the HTTP request
            RestResponse localVarResponse = (RestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, ChangeHttpMethod("GET"), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType);
            int localVarStatusCode = (int) localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("GetDestination", localVarResponse);
                if (exception != null) throw exception;
            }

            return new ApiResponse<GetDestinationResponse>(localVarResponse.StatusCode,
                ConvertHeadersToMultimap(localVarResponse),
                (GetDestinationResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetDestinationResponse)));
        }

        /// <summary>
        ///  Returns information about all destinations. The &#x60;getDestinations&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <returns>GetDestinationsResponse</returns>
        public GetDestinationsResponse GetDestinations ()
        {
             ApiResponse<GetDestinationsResponse> localVarResponse = GetDestinationsWithHttpInfo();
             return localVarResponse.Data;
        }

        /// <summary>
        ///  Returns information about all destinations. The &#x60;getDestinations&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <returns>ApiResponse of GetDestinationsResponse</returns>
        public ApiResponse< GetDestinationsResponse > GetDestinationsWithHttpInfo ()
        {

            var localVarPath = "/notifications/v1/destinations";
            var localVarPathParams = new Dictionary<String, String>();
            var localVarQueryParams = new List<KeyValuePair<String, String>>();
            var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
            var localVarFormParams = new Dictionary<String, String>();
            var localVarFileParams = new Dictionary<String, FileParameter>();
            Object localVarPostBody = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json",
                "Successful Response"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
            if (localVarHttpHeaderAccept != null)
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);



            // make the HTTP request
            RestResponse localVarResponse = (RestResponse) this.Configuration.ApiClient.CallApi(localVarPath, ChangeHttpMethod("GET"), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int) localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("GetDestinations", localVarResponse);
                if (exception != null) throw exception;
            }

            return new ApiResponse<GetDestinationsResponse>(localVarResponse.StatusCode,
                ConvertHeadersToMultimap(localVarResponse),
                (GetDestinationsResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetDestinationsResponse)));
        }

        /// <summary>
        ///  Returns information about all destinations. The &#x60;getDestinations&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <returns>Task of GetDestinationsResponse</returns>
        public async System.Threading.Tasks.Task<GetDestinationsResponse> GetDestinationsAsync ()
        {
             ApiResponse<GetDestinationsResponse> localVarResponse = await GetDestinationsAsyncWithHttpInfo();
             return localVarResponse.Data;

        }

        /// <summary>
        ///  Returns information about all destinations. The &#x60;getDestinations&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <returns>Task of ApiResponse (GetDestinationsResponse)</returns>
        public async System.Threading.Tasks.Task<ApiResponse<GetDestinationsResponse>> GetDestinationsAsyncWithHttpInfo ()
        {

            var localVarPath = "/notifications/v1/destinations";
            var localVarPathParams = new Dictionary<String, String>();
            var localVarQueryParams = new List<KeyValuePair<String, String>>();
            var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
            var localVarFormParams = new Dictionary<String, String>();
            var localVarFileParams = new Dictionary<String, FileParameter>();
            Object localVarPostBody = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json",
                "Successful Response"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
            if (localVarHttpHeaderAccept != null)
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);



            // make the HTTP request
            RestResponse localVarResponse = (RestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, ChangeHttpMethod("GET"), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType);
            int localVarStatusCode = (int) localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("GetDestinations", localVarResponse);
                if (exception != null) throw exception;
            }

            return new ApiResponse<GetDestinationsResponse>(localVarResponse.StatusCode,
                ConvertHeadersToMultimap(localVarResponse),
                (GetDestinationsResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetDestinationsResponse)));
        }

        /// <summary>
        ///  Returns information about subscription of the specified notification type and payload version. &#x60;payloadVersion&#x60; is an optional parameter. When &#x60;payloadVersion&#x60; is not provided, it will return latest payload version subscription&#39;s information. You can use this API to get subscription information when you do not have a subscription identifier.  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="notificationType">The type of notification.   For more information about notification types, refer to [Notification Type Values](https://developer-docs.amazon.com/sp-api/docs/notification-type-values).</param>
        /// <param name="payloadVersion">The version of the payload object to be used in the notification. (optional)</param>
        /// <returns>GetSubscriptionResponse</returns>
        public GetSubscriptionResponse GetSubscription (string notificationType, string? payloadVersion = null)
        {
             ApiResponse<GetSubscriptionResponse> localVarResponse = GetSubscriptionWithHttpInfo(notificationType, payloadVersion);
             return localVarResponse.Data;
        }

        /// <summary>
        ///  Returns information about subscription of the specified notification type and payload version. &#x60;payloadVersion&#x60; is an optional parameter. When &#x60;payloadVersion&#x60; is not provided, it will return latest payload version subscription&#39;s information. You can use this API to get subscription information when you do not have a subscription identifier.  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="notificationType">The type of notification.   For more information about notification types, refer to [Notification Type Values](https://developer-docs.amazon.com/sp-api/docs/notification-type-values).</param>
        /// <param name="payloadVersion">The version of the payload object to be used in the notification. (optional)</param>
        /// <returns>ApiResponse of GetSubscriptionResponse</returns>
        public ApiResponse< GetSubscriptionResponse > GetSubscriptionWithHttpInfo (string notificationType, string? payloadVersion = null)
        {
            // verify the required parameter 'notificationType' is set
            if (notificationType == null)
                throw new ApiException(400, "Missing required parameter 'notificationType' when calling NotificationsApi->GetSubscription");

            var localVarPath = "/notifications/v1/subscriptions/{notificationType}";
            var localVarPathParams = new Dictionary<String, String>();
            var localVarQueryParams = new List<KeyValuePair<String, String>>();
            var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
            var localVarFormParams = new Dictionary<String, String>();
            var localVarFileParams = new Dictionary<String, FileParameter>();
            Object localVarPostBody = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json",
                "Successful Response"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
            if (localVarHttpHeaderAccept != null)
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);

            if (notificationType != null) localVarPathParams.Add("notificationType", this.Configuration.ApiClient.ParameterToString(notificationType)); // path parameter
            if (payloadVersion != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "payloadVersion", payloadVersion)); // query parameter


            // make the HTTP request
            RestResponse localVarResponse = (RestResponse) this.Configuration.ApiClient.CallApi(localVarPath, ChangeHttpMethod("GET"), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int) localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("GetSubscription", localVarResponse);
                if (exception != null) throw exception;
            }

            return new ApiResponse<GetSubscriptionResponse>(localVarResponse.StatusCode,
                ConvertHeadersToMultimap(localVarResponse),
                (GetSubscriptionResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionResponse)));
        }

        /// <summary>
        ///  Returns information about subscription of the specified notification type and payload version. &#x60;payloadVersion&#x60; is an optional parameter. When &#x60;payloadVersion&#x60; is not provided, it will return latest payload version subscription&#39;s information. You can use this API to get subscription information when you do not have a subscription identifier.  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="notificationType">The type of notification.   For more information about notification types, refer to [Notification Type Values](https://developer-docs.amazon.com/sp-api/docs/notification-type-values).</param>
        /// <param name="payloadVersion">The version of the payload object to be used in the notification. (optional)</param>
        /// <returns>Task of GetSubscriptionResponse</returns>
        public async System.Threading.Tasks.Task<GetSubscriptionResponse> GetSubscriptionAsync (string notificationType, string? payloadVersion = null)
        {
             ApiResponse<GetSubscriptionResponse> localVarResponse = await GetSubscriptionAsyncWithHttpInfo(notificationType, payloadVersion);
             return localVarResponse.Data;

        }

        /// <summary>
        ///  Returns information about subscription of the specified notification type and payload version. &#x60;payloadVersion&#x60; is an optional parameter. When &#x60;payloadVersion&#x60; is not provided, it will return latest payload version subscription&#39;s information. You can use this API to get subscription information when you do not have a subscription identifier.  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="notificationType">The type of notification.   For more information about notification types, refer to [Notification Type Values](https://developer-docs.amazon.com/sp-api/docs/notification-type-values).</param>
        /// <param name="payloadVersion">The version of the payload object to be used in the notification. (optional)</param>
        /// <returns>Task of ApiResponse (GetSubscriptionResponse)</returns>
        public async System.Threading.Tasks.Task<ApiResponse<GetSubscriptionResponse>> GetSubscriptionAsyncWithHttpInfo (string notificationType, string? payloadVersion = null)
        {
            // verify the required parameter 'notificationType' is set
            if (notificationType == null)
                throw new ApiException(400, "Missing required parameter 'notificationType' when calling NotificationsApi->GetSubscription");

            var localVarPath = "/notifications/v1/subscriptions/{notificationType}";
            var localVarPathParams = new Dictionary<String, String>();
            var localVarQueryParams = new List<KeyValuePair<String, String>>();
            var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
            var localVarFormParams = new Dictionary<String, String>();
            var localVarFileParams = new Dictionary<String, FileParameter>();
            Object localVarPostBody = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json",
                "Successful Response"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
            if (localVarHttpHeaderAccept != null)
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);

            if (notificationType != null) localVarPathParams.Add("notificationType", this.Configuration.ApiClient.ParameterToString(notificationType)); // path parameter
            if (payloadVersion != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "payloadVersion", payloadVersion)); // query parameter


            // make the HTTP request
            RestResponse localVarResponse = (RestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, ChangeHttpMethod("GET"), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType);
            int localVarStatusCode = (int) localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("GetSubscription", localVarResponse);
                if (exception != null) throw exception;
            }

            return new ApiResponse<GetSubscriptionResponse>(localVarResponse.StatusCode,
                ConvertHeadersToMultimap(localVarResponse),
                (GetSubscriptionResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionResponse)));
        }

        /// <summary>
        ///  Returns information about a subscription for the specified notification type. The &#x60;getSubscriptionById&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="subscriptionId">The identifier for the subscription that you want to get.</param>
        /// <param name="notificationType">The type of notification.   For more information about notification types, refer to [Notification Type Values](https://developer-docs.amazon.com/sp-api/docs/notification-type-values).</param>
        /// <returns>GetSubscriptionByIdResponse</returns>
        public GetSubscriptionByIdResponse GetSubscriptionById (string subscriptionId, string notificationType)
        {
             ApiResponse<GetSubscriptionByIdResponse> localVarResponse = GetSubscriptionByIdWithHttpInfo(subscriptionId, notificationType);
             return localVarResponse.Data;
        }

        /// <summary>
        ///  Returns information about a subscription for the specified notification type. The &#x60;getSubscriptionById&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="subscriptionId">The identifier for the subscription that you want to get.</param>
        /// <param name="notificationType">The type of notification.   For more information about notification types, refer to [Notification Type Values](https://developer-docs.amazon.com/sp-api/docs/notification-type-values).</param>
        /// <returns>ApiResponse of GetSubscriptionByIdResponse</returns>
        public ApiResponse< GetSubscriptionByIdResponse > GetSubscriptionByIdWithHttpInfo (string subscriptionId, string notificationType)
        {
            // verify the required parameter 'subscriptionId' is set
            if (subscriptionId == null)
                throw new ApiException(400, "Missing required parameter 'subscriptionId' when calling NotificationsApi->GetSubscriptionById");
            // verify the required parameter 'notificationType' is set
            if (notificationType == null)
                throw new ApiException(400, "Missing required parameter 'notificationType' when calling NotificationsApi->GetSubscriptionById");

            var localVarPath = "/notifications/v1/subscriptions/{notificationType}/{subscriptionId}";
            var localVarPathParams = new Dictionary<String, String>();
            var localVarQueryParams = new List<KeyValuePair<String, String>>();
            var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
            var localVarFormParams = new Dictionary<String, String>();
            var localVarFileParams = new Dictionary<String, FileParameter>();
            Object localVarPostBody = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json",
                "Successful Response"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
            if (localVarHttpHeaderAccept != null)
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);

            if (subscriptionId != null) localVarPathParams.Add("subscriptionId", this.Configuration.ApiClient.ParameterToString(subscriptionId)); // path parameter
            if (notificationType != null) localVarPathParams.Add("notificationType", this.Configuration.ApiClient.ParameterToString(notificationType)); // path parameter


            // make the HTTP request
            RestResponse localVarResponse = (RestResponse) this.Configuration.ApiClient.CallApi(localVarPath, ChangeHttpMethod("GET"), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType);

            int localVarStatusCode = (int) localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("GetSubscriptionById", localVarResponse);
                if (exception != null) throw exception;
            }

            return new ApiResponse<GetSubscriptionByIdResponse>(localVarResponse.StatusCode,
                ConvertHeadersToMultimap(localVarResponse),
                (GetSubscriptionByIdResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionByIdResponse)));
        }

        /// <summary>
        ///  Returns information about a subscription for the specified notification type. The &#x60;getSubscriptionById&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="subscriptionId">The identifier for the subscription that you want to get.</param>
        /// <param name="notificationType">The type of notification.   For more information about notification types, refer to [Notification Type Values](https://developer-docs.amazon.com/sp-api/docs/notification-type-values).</param>
        /// <returns>Task of GetSubscriptionByIdResponse</returns>
        public async System.Threading.Tasks.Task<GetSubscriptionByIdResponse> GetSubscriptionByIdAsync (string subscriptionId, string notificationType)
        {
             ApiResponse<GetSubscriptionByIdResponse> localVarResponse = await GetSubscriptionByIdAsyncWithHttpInfo(subscriptionId, notificationType);
             return localVarResponse.Data;

        }

        /// <summary>
        ///  Returns information about a subscription for the specified notification type. The &#x60;getSubscriptionById&#x60; operation is grantless. For more information, refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations).  **Usage Plan:**  | Rate (requests per second) | Burst | | - -- - | - -- - | | 1 | 5 |  The &#x60;x-amzn-RateLimit-Limit&#x60; response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may observe higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
        /// </summary>
        /// <exception cref="software.amzn.spapi.Client.ApiException">Thrown when fails to make API call</exception>
        /// <param name="subscriptionId">The identifier for the subscription that you want to get.</param>
        /// <param name="notificationType">The type of notification.   For more information about notification types, refer to [Notification Type Values](https://developer-docs.amazon.com/sp-api/docs/notification-type-values).</param>
        /// <returns>Task of ApiResponse (GetSubscriptionByIdResponse)</returns>
        public async System.Threading.Tasks.Task<ApiResponse<GetSubscriptionByIdResponse>> GetSubscriptionByIdAsyncWithHttpInfo (string subscriptionId, string notificationType)
        {
            // verify the required parameter 'subscriptionId' is set
            if (subscriptionId == null)
                throw new ApiException(400, "Missing required parameter 'subscriptionId' when calling NotificationsApi->GetSubscriptionById");
            // verify the required parameter 'notificationType' is set
            if (notificationType == null)
                throw new ApiException(400, "Missing required parameter 'notificationType' when calling NotificationsApi->GetSubscriptionById");

            var localVarPath = "/notifications/v1/subscriptions/{notificationType}/{subscriptionId}";
            var localVarPathParams = new Dictionary<String, String>();
            var localVarQueryParams = new List<KeyValuePair<String, String>>();
            var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
            var localVarFormParams = new Dictionary<String, String>();
            var localVarFileParams = new Dictionary<String, FileParameter>();
            Object localVarPostBody = null;

            // to determine the Content-Type header
            String[] localVarHttpContentTypes = new String[] {
            };
            String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);

            // to determine the Accept header
            String[] localVarHttpHeaderAccepts = new String[] {
                "application/json",
                "Successful Response"
            };
            String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
            if (localVarHttpHeaderAccept != null)
                localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);

            if (subscriptionId != null) localVarPathParams.Add("subscriptionId", this.Configuration.ApiClient.ParameterToString(subscriptionId)); // path parameter
            if (notificationType != null) localVarPathParams.Add("notificationType", this.Configuration.ApiClient.ParameterToString(notificationType)); // path parameter


            // make the HTTP request
            RestResponse localVarResponse = (RestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, ChangeHttpMethod("GET"), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType);
            int localVarStatusCode = (int) localVarResponse.StatusCode;

            if (ExceptionFactory != null)
            {
                Exception exception = ExceptionFactory("GetSubscriptionById", localVarResponse);
                if (exception != null) throw exception;
            }

            return new ApiResponse<GetSubscriptionByIdResponse>(localVarResponse.StatusCode,
                ConvertHeadersToMultimap(localVarResponse),
                (GetSubscriptionByIdResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(GetSubscriptionByIdResponse)));
        }


        public class Builder
        {
            private LWAAuthorizationCredentials lwaAuthorizationCredentials;
            private RateLimitConfiguration rateLimitConfiguration;

            public Builder SetLWAAuthorizationCredentials(LWAAuthorizationCredentials lwaAuthorizationCredentials)
            {
                this.lwaAuthorizationCredentials = lwaAuthorizationCredentials;
                return this;
            }
            
            
            public Builder SetRateLimitConfiguration(RateLimitConfiguration rateLimitConfiguration)
            {
                this.rateLimitConfiguration = rateLimitConfiguration;
                return this;
            }

            public NotificationsApi Build() 
            {
                if (lwaAuthorizationCredentials == null) 
                {
                    throw new NullReferenceException("LWAAuthoriztionCredentials not set");
                }

                
                software.amzn.spapi.Client.Configuration configuration = new software.amzn.spapi.Client.Configuration()
                {
                    AuthorizationCredentials = lwaAuthorizationCredentials,
                    RateLimitConfig = rateLimitConfiguration
                };

                // default HTTP connection timeout (in milliseconds)
                configuration.initializeApiClient();
                configuration.Timeout = 100000;

                return new NotificationsApi(configuration);
            }
        }
        
        private static Multimap<string, string> ConvertHeadersToMultimap(RestResponse response)
        {
            var multimap = new Multimap<string, string>();
            foreach (var header in response.Headers)
            {
                multimap.Add(header.Name, header.Value?.ToString());
            }
            return multimap;
        }


        private static RestSharp.Method ChangeHttpMethod(String httpMethod) {
            switch(httpMethod) {
                case "GET":
                    // GET logic
                    return Method.Get;
                case "POST":
                    // POST logic
                    return Method.Post;
                case "DELETE":
                    return Method.Delete;
                case "PUT":
                    return Method.Put;
                case "PATCH":
                    return Method.Patch;
                case "OPTIONS":
                    return Method.Options;
            }
            return Method.Head;
        }

    }
}
